/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GIngreso.java
 *
 * Created on 03/10/2011, 21:09:24
 */

package Articulo;

import java.awt.event.ActionListener;
import java.awt.event.KeyListener;
import javax.swing.JTextField;

/**
 *
 * @author nan
 */
public class GModifica extends javax.swing.JFrame {

    /** Creates new form GIngreso */
    public GModifica() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTextFieldNombre = new javax.swing.JTextField();
        jTextFieldmarca = new javax.swing.JTextField();
        jTextFielddescripcion = new javax.swing.JTextField();
        jTextFieldprecioCosto = new javax.swing.JTextField();
        jLabelNombre = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jTextFieldStockMin = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jTextFieldStockMax = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jButtonModificar = new javax.swing.JButton();
        jButtonCancelar = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        Stock = new javax.swing.JTextField();

        setTitle("Modificar Articulo");

        jTextFieldNombre.setFont(new java.awt.Font("Ubuntu", 0, 18));

        jTextFieldmarca.setFont(new java.awt.Font("Ubuntu", 0, 18));

        jTextFielddescripcion.setFont(new java.awt.Font("Ubuntu", 0, 18));

        jTextFieldprecioCosto.setFont(new java.awt.Font("Ubuntu", 0, 18));

        jLabelNombre.setText("Nombre");

        jLabel2.setText("Ingrese Marca");

        jLabel3.setText("Ingrese Descripcion");

        jLabel4.setText("Ingrese Precio Costo");

        jTextFieldStockMin.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jTextFieldStockMin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldStockMinActionPerformed(evt);
            }
        });

        jLabel5.setText("Ingrese Stock Minimo");

        jTextFieldStockMax.setFont(new java.awt.Font("Ubuntu", 0, 18));
        jTextFieldStockMax.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldStockMaxActionPerformed(evt);
            }
        });

        jLabel6.setText("Ingrese Stock Maximo");

        jButtonModificar.setText("Modificar");
        jButtonModificar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonModificarActionPerformed(evt);
            }
        });

        jButtonCancelar.setText("Cancelar");

        jLabel7.setText("Ingrese Stock");

        Stock.setFont(new java.awt.Font("Ubuntu", 0, 18));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3)
                            .addComponent(jLabel4)
                            .addComponent(jLabel5)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jButtonModificar)
                                .addComponent(jLabel6))
                            .addComponent(jLabelNombre))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(82, 82, 82)
                                .addComponent(jButtonCancelar))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jTextFieldNombre)
                                    .addComponent(jTextFieldmarca)
                                    .addComponent(jTextFielddescripcion)
                                    .addComponent(jTextFieldprecioCosto)
                                    .addComponent(jTextFieldStockMin)
                                    .addComponent(jTextFieldStockMax)
                                    .addComponent(Stock, javax.swing.GroupLayout.DEFAULT_SIZE, 248, Short.MAX_VALUE)))))
                    .addComponent(jLabel7))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelNombre)
                    .addComponent(jTextFieldNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jTextFieldmarca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jTextFielddescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(jTextFieldprecioCosto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jTextFieldStockMin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jTextFieldStockMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(Stock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonCancelar)
                    .addComponent(jButtonModificar))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTextFieldStockMaxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldStockMaxActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextFieldStockMaxActionPerformed

    private void jButtonModificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonModificarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonModificarActionPerformed

    private void jTextFieldStockMinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldStockMinActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextFieldStockMinActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new GModifica().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField Stock;
    private javax.swing.JButton jButtonCancelar;
    private javax.swing.JButton jButtonModificar;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabelNombre;
    private javax.swing.JTextField jTextFieldNombre;
    private javax.swing.JTextField jTextFieldStockMax;
    private javax.swing.JTextField jTextFieldStockMin;
    private javax.swing.JTextField jTextFielddescripcion;
    private javax.swing.JTextField jTextFieldmarca;
    private javax.swing.JTextField jTextFieldprecioCosto;
    // End of variables declaration//GEN-END:variables

    public void setActionListeners(ActionListener lis){
        this.getjButtonModificar().addActionListener(lis);
        this.getjButtonCancelar().addActionListener(lis);
        
    }

    void setKeyListener(KeyListener lis) {
        this.getjTextFieldNombre().addKeyListener(lis);
        this.getjTextFieldmarca().addKeyListener(lis);
        this.getjTextFielddescripcion().addKeyListener(lis);
        this.getjTextFieldprecioCosto().addKeyListener(lis);
        this.getjTextFieldStockMin().addKeyListener(lis);
        this.getjTextFieldStockMax().addKeyListener(lis);
        this.getStock().addKeyListener(lis);
    }

    /**
     * @return the jButtonAceptar
     */
    public javax.swing.JButton getjButtonAceptar() {
        return getjButtonModificar();
    }

    /**
     * @return the jButtonCancelar
     */
    public javax.swing.JButton getjButtonCancelar() {
        return jButtonCancelar;
    }

    /**
     * @return the jTextFieldStockMax
     */
    public javax.swing.JTextField getjTextFieldStockMax() {
        return jTextFieldStockMax;
    }

    /**
     * @return the jTextFieldStockMin
     */
    public javax.swing.JTextField getjTextFieldStockMin() {
        return jTextFieldStockMin;
    }

    

    /**
     * @return the jTextFielddescripcion
     */
    public javax.swing.JTextField getjTextFielddescripcion() {
        return jTextFielddescripcion;
    }

    /**
     * @return the jTextFieldmarca
     */
    public javax.swing.JTextField getjTextFieldmarca() {
        return jTextFieldmarca;
    }

    /**
     * @return the jTextFieldprecioCosto
     */
    public javax.swing.JTextField getjTextFieldprecioCosto() {
        return jTextFieldprecioCosto;
    }


    /**
     * @return the Stock
     */
    public javax.swing.JTextField getStock() {
        return Stock;
    }

    /**
     * @return the jButtonModificar
     */
    public javax.swing.JButton getjButtonModificar() {
        return jButtonModificar;
    }

    /**
     * @return the jTextFieldNombre
     */
    public javax.swing.JTextField getjTextFieldNombre() {
        return jTextFieldNombre;
    }

    

}
